/*
 * FileUtils.cpp
 *
 *  Created on: 21-09-2013
 *      Author: Krzychu
 */

#include <sstream>

#include <iostream>
#include <fstream>

#include "FileUtils.h"

FileUtils::FileUtils()
{

}

FileUtils::~FileUtils()
{

}

string FileUtils::readStringFromFile(string fileName)
{
	ostringstream result;

	ifstream file;

	file.open (fileName.c_str(), ifstream::in);

	string line;

	if (file.is_open())
	{
		while (getline(file, line))
		{
			result << line;
		}
		file.close();
	}
	else
	{
		cout << "Cannot open " << fileName << endl;
	}

	return result.str();
}

